import { Component, ViewChild } from '@angular/core';
import { NavController, NavParams, Nav } from 'ionic-angular';
import { ParkListPage } from '../park-list/park-list';
import { AboutPage } from '../about/about';
import { CePage } from '../ce/ce';


@Component({
  selector: 'page-park-sidemenu',
  templateUrl: 'park-sidemenu.html',
})
export class ParkSidemenuPage {
  
  @ViewChild(Nav) nav: Nav;
  rootPage: any = ParkListPage;
  pages: Array<{title: string, component: any}>;

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    this.pages=[
      {title: '景区', component: ParkListPage},
      {title: '关于', component: AboutPage}
    ];
  }

  openPage(page) {
    this.nav.setRoot(page.component);
  }
}
